HAL RNG control functions migration ¶
This section provides information about the HAL RNG control functions migration.
HAL RNG generate random number ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit)
/* or */
uint32_t HAL_RNG_GetRandomNumber(RNG_HandleTypeDef *hrng)
|
hal_status_t HAL_RNG_GenerateRandomNumber(hal_rng_handle_t *hrng, uint32_t *p_data, uint32_t size_word,
uint32_t timeout_ms)
|
Related use case: Use case: RNG generate NIST compliant random numbers in polling mode
HAL RNG generate random number IT ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber_IT(RNG_HandleTypeDef *hrng)
/* or */
uint32_t HAL_RNG_GetRandomNumber_IT(RNG_HandleTypeDef *hrng)
|
hal_status_t HAL_RNG_GenerateRandomNumber_IT(hal_rng_handle_t *hrng, uint32_t *p_data, uint32_t size_word)
|
Related use case: Use case: RNG generate NIST compliant random numbers in interrupt mode
HAL RNG read last random number ¶
|
HAL1 |
HAL2 |
|---|---|
uint32_t HAL_RNG_ReadLastRandomNumber(const RNG_HandleTypeDef *hrng);
|
Removed from HAL2. The requested random numbers are automatically filled into the user buffer given to the
|